package org.fujene.structure;

public class ExtendResult{
	ContentInfo contentInfo;
	ExtendQueue[] results;
	int total;

	public ExtendResult(ContentInfo contentInfo){
		this.contentInfo = contentInfo;
	}

	public void setResult(ExtendQueue[] results){
		this.results = results;
	}

	public String getStrByIndex(int queueIndex, boolean isContent, int contentIndex){
		if (isContent)
			return this.results[queueIndex].contents[contentIndex];
		else return this.results[queueIndex].appendices[contentIndex];
	}

	public ExtendQueue getQueue(int index){
		return this.results[index];
	}

	public ExtendQueue[] getQueues(){
		return this.results;
	}

	public int getLength(){
		if (this.results != null)
			return this.results.length;
		else return 0;
	}
	
	public void setTotal(int total) {
		this.total = total;
	}
	
	public int getTotal(){
		return total;
	}

	public void clearResult(){
		this.results = null;
	}
}
